package org.jsola.hr.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.jsola.hr.entity.SiteContractQuotaDO;
import org.jsola.orm.mapper.IJsolaMapper;
import org.springframework.stereotype.Repository;


/**
 * @author wcl
 */
@Repository("hrSiteContractQuotaDAO")
public interface ISiteContractQuotaDAO extends IJsolaMapper<SiteContractQuotaDO> {

    /**
     * 充值租户份额
     */
    @Update("UPDATE `hr_site_contract_quota` SET face_count = face_count +#{faceCount}, contract_count = contract_count + #{contractCount} WHERE site_id = #{siteId}")
    Integer add(@Param("contractCount") Integer contractCount, @Param("faceCount") Integer faceCount, @Param("siteId") String siteId);
}

